import Axios from "axios"

export default class ExpressType {
    static expresstype = null

    static getInstance() {
        if (this.expresstype == null) {
            this.expresstype = new ExpressType()
        }
        return this.expresstype
    }
    //查询全部
    list(exp){
        return Axios.get("http://localhost/expresstype",{params :exp})
    }
    //根据Id查询
    listByid(id){
        return Axios.get(`http://localhost/expresstype/${id}`)
    }
    //添加员工
    save(exp){
        return Axios.post("http://localhost/expresstype/add",exp)
    }
    //修改
    update(exp){
        return Axios.put("http://localhost/expresstype/update",exp)
    }
    //删除
    remove(id){
        return Axios.delete(`http://localhost/expresstype/${id}`)
    }
}